import Vue from "vue";
import VueRouter from "vue-router";
import Index from "@/views/index.vue";
import My from "@/views/my.vue";
import Sports from "@/views/sports.vue";
import Music from "@/views/sencess/myMusic.vue";
import Filter from "@/views/sencess/myFiller.vue";
import Lyf from "@/views/three/lyf.vue";
import Wyf from "@/views/three/wyf.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/index",
  },
  {
    path: "/index",
    component: Index,
  },
  {
    path: "/my",
    component: My,
    redirect: "/my/music/wyf",
    children: [
      {
        path: "music",
        component: Music,
        children: [
          {
            path: "wyf",
            component: Wyf,
          },
          {
            path: "lyf",
            component: Lyf,
          },
        ],
      },
      {
        path: "filter",
        component: Filter,
      },
    ],
  },
  {
    path: "/sports",
    component: Sports,
  },
];

const router = new VueRouter({
  routes,
});

export default router;
